home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / programming / gui / precog2_1.lha / Precognition2_1 / include / ListBrowser.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-10-11  |  1.9 KB  |  73 lines

  1. /* ==========================================================================
  2. **
  3. **                         ListBrowser.h
  4. **
  5. ** PObject<GraphicObject<Interactor<StringLister<ListBrowser
  6. **
  7. ** A ListBrowser displays a list of strings, and allows the user to select
  8. ** one or more of them.
  9. **
  10. ** ©1991 WILLISoft
  11. **
  12. ** ==========================================================================
  13. */
  14.  
  15. #ifndef LISTBROWSER_H
  16. #define LISTBROWSER_H
  17.  
  18. #include "StringList.h"
  19. #include "StringLister.h"
  20. #include "Precognition3D.h"
  21. #include "EmbossedGadget.h"
  22.  
  23. typedef struct ListBrowser
  24.    {
  25.       EmbossedGadget     eg;
  26.       StringList         List;
  27.       BOOL               SelectMany;
  28.       USHORT             nRows;
  29.       USHORT             nColumns;
  30.       USHORT             YOffset;
  31.    } ListBrowser;
  32.  
  33.  
  34.  
  35.  
  36. void ListBrowser_Init __PARMS((
  37.                        ListBrowser   *self,
  38.                        PIXELS         LeftEdge,
  39.                        PIXELS         TopEdge,
  40.                        PIXELS         Width,
  41.                        PIXELS         Height,
  42.                        pcg_3DPens     Pens,
  43.                        BOOL           SelectMany
  44.                     ));
  45.  
  46. /* Added for prototype needed by ScrollingList.c in precog.lib */
  47. void ListBrowser_SelectAll __PARMS(( ListBrowser *self, BOOL Select ));
  48.  
  49. USHORT ListBrowser_SetYOffset __PARMS((
  50.                                ListBrowser *Browser,
  51.                                USHORT       YOffset
  52.                              ));
  53. /*
  54. **  Scrols the list to set YOffset at the top.
  55. **
  56. **  e.g. YOffset = 0  -> the first element in the list is at the top.
  57. **       YOffset = 10 -> the 11th element....
  58. */
  59.  
  60.  
  61.  
  62. /* -- Qualifiers for 'AddString()'.
  63. **
  64. ** ENTRY_SELECTED    : This element is selected.
  65. ** ENTRY_SPECIAL     : Displayed in a different pen color.
  66. ** ENTRY_DISABLED    : Displayed ghosted.
  67. */
  68. #define ENTRY_SELECTED     1
  69. #define ENTRY_SPECIAL      2
  70. #define ENTRY_DISABLED     4
  71.  
  72. #endif
  73.